Skip to content

Conversation

@dejan2609
Copy link
Contributor

@dejan2609 dejan2609 commented Oct 15, 2025

Prologue:


Related JIRA ticket: KAFKA-19771

details:

  • spotbugs: 4.9.4 -->> 4.9.8
  • spotbugs gradle plugin: 6.2.5 -->> 6.4.4
  • spotbugs tasks are enabled for Java 25

related links:

https://github.com/spotbugs/spotbugs/blob/4.9.8/CHANGELOG.md#498---2025-10-18

Reviewers: Chia-Ping Tsai [email protected]

@github-actions github-actions bot added triage PRs from the community build Gradle build or GitHub Actions small Small PRs labels Oct 15, 2025
@dejan2609
Copy link
Contributor Author

Note: I'll force-push the commit (I somehow forgot to sign it).

@dejan2609 dejan2609 force-pushed the KAFKA-19771 branch 2 times, most recently from 881c4eb to 1d9143a Compare October 15, 2025 06:33
@dejan2609
Copy link
Contributor Author

Done, commit is signed now ✅

@dejan2609
Copy link
Contributor Author

Thank you @omkreddy 👌

@dejan2609
Copy link
Contributor Author

dejan2609 commented Oct 15, 2025

@chia7712 I tested this on my machine also (just-in-case) and build works just fine ✅

Gradle build results (click to expand)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ git log -2 --oneline 
1d9143aa64 (HEAD -> KAFKA-19771, origin/KAFKA-19771) KAFKA-19771 SpotBugs version update (Java 25 compatible version)
2da83ab358 MINOR: Update OffsetResetStrategy Javadoc (#20701)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ java -version
openjdk version "25" 2025-09-16 LTS
OpenJDK Runtime Environment Temurin-25+36 (build 25+36-LTS)
OpenJDK 64-Bit Server VM Temurin-25+36 (build 25+36-LTS, mixed mode, sharing)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew clean spotbugsMain spotbugsTest -x test

> Configure project :
Starting build with version 4.2.0-SNAPSHOT (commit id 1d9143aa) using Gradle 9.1.0, Java 25 and Scala 2.13.17
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0

> Task :raft:processMessages
MessageGenerator: processed 1 Kafka message JSON file(s).

> Task :transaction-coordinator:processMessages
MessageGenerator: processed 2 Kafka message JSON file(s).

> Task :share-coordinator:processMessages
MessageGenerator: processed 4 Kafka message JSON file(s).

> Task :storage:processMessages
MessageGenerator: processed 5 Kafka message JSON file(s).

> Task :group-coordinator:processMessages
MessageGenerator: processed 44 Kafka message JSON file(s).

> Task :metadata:processMessages
MessageGenerator: processed 26 Kafka message JSON file(s).

> Task :clients:processMessages
MessageGenerator: processed 197 Kafka message JSON file(s).

> Task :streams:processMessages
MessageGenerator: processed 1 Kafka message JSON file(s).

> Task :clients:processTestMessages
MessageGenerator: processed 4 Kafka message JSON file(s).
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by net.openhft.hashing.UnsafeAccess (file:/home/dejan/.gradle/caches/modules-2/files-2.1/net.openhft/zero-allocation-hashing/0.16/ca252f328160ed5d027f100a4fe525d6d21daaf/zero-allocation-hashing-0.16.jar)
WARNING: Please consider reporting this to the maintainers of class net.openhft.hashing.UnsafeAccess
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release

> Task :clients:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :metadata:compileTestJava
Note: /home/dejan/kafka/metadata/src/test/java/org/apache/kafka/controller/metrics/QuorumControllerMetricsTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :connect:mirror:spotbugsMain
The following classes needed for analysis were missing:
  org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
  org.apache.maven.artifact.versioning.VersionRange

> Task :server:compileTestJava
Note: /home/dejan/kafka/server/src/test/java/org/apache/kafka/server/AssignmentsManagerTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by net.openhft.hashing.UnsafeAccess (file:/home/dejan/.gradle/caches/modules-2/files-2.1/net.openhft/zero-allocation-hashing/0.16/ca252f328160ed5d027f100a4fe525d6d21daaf/zero-allocation-hashing-0.16.jar)
WARNING: Please consider reporting this to the maintainers of class net.openhft.hashing.UnsafeAccess
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by net.openhft.hashing.UnsafeAccess (file:/home/dejan/.gradle/caches/modules-2/files-2.1/net.openhft/zero-allocation-hashing/0.16/ca252f328160ed5d027f100a4fe525d6d21daaf/zero-allocation-hashing-0.16.jar)
WARNING: Please consider reporting this to the maintainers of class net.openhft.hashing.UnsafeAccess
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release

> Task :transaction-coordinator:compileTestJava
Note: /home/dejan/kafka/transaction-coordinator/src/test/java/org/apache/kafka/coordinator/transaction/TransactionLogTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.

> Task :connect:runtime:compileTestJava
Note: /home/dejan/kafka/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerSinkTaskTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :streams:compileTestJava
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/dejan/kafka/streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by net.openhft.hashing.UnsafeAccess (file:/home/dejan/.gradle/caches/modules-2/files-2.1/net.openhft/zero-allocation-hashing/0.16/ca252f328160ed5d027f100a4fe525d6d21daaf/zero-allocation-hashing-0.16.jar)
WARNING: Please consider reporting this to the maintainers of class net.openhft.hashing.UnsafeAccess
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release

> Task :storage:compileTestJava
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

> Task :jmh-benchmarks:spotbugsMain
The following classes needed for analysis were missing:
  com.typesafe.scalalogging.Logger
  org.apache.kafka.server.log.remote.storage.RetriableRemoteStorageException
  com.typesafe.scalalogging.Logger$

[Incubating] Problems report is available at: file:///home/dejan/kafka/build/reports/problems/problems-report.html

Deprecated Gradle features were used in this build, making it incompatible with Gradle 10.

You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.

For more on this, please refer to https://docs.gradle.org/9.1.0/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.

BUILD SUCCESSFUL in 13m 23s
246 actionable tasks: 246 executed
Consider enabling configuration cache to speed up this build: https://docs.gradle.org/9.1.0/userguide/configuration_cache_enabling.html
dejan@dejan-HP-ProBook-450-G7:~/kafka$ 

@dejan2609
Copy link
Contributor Author

⚠️ Have to rebase this (to resolve git merge conflict).

@dejan2609
Copy link
Contributor Author

@chia7712 All in green, ready for a review 🍀 ✅

Gradle build results (click to expand) ⬇️
dejan@dejan-HP-ProBook-450-G7:~/kafka$ date
Fri 17 Oct 10:15:25 CEST 2025
dejan@dejan-HP-ProBook-450-G7:~/kafka$ git log -2 --oneline
21f9760fd3 (HEAD -> KAFKA-19771, origin/KAFKA-19771) KAFKA-19771 SpotBugs version update (Java 25 compatible version)
d35324e43e MINOR: Mark flaky test on AclMetadataControlManagerTest (#20713)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ java -version
openjdk version "25" 2025-09-16 LTS
OpenJDK Runtime Environment Temurin-25+36 (build 25+36-LTS)
OpenJDK 64-Bit Server VM Temurin-25+36 (build 25+36-LTS, mixed mode, sharing)
dejan@dejan-HP-ProBook-450-G7:~/kafka$ ./gradlew clean spotbugsMain spotbugsTest -x test -q
Starting build with version 4.2.0-SNAPSHOT (commit id 21f9760f) using Gradle 9.1.0, Java 25 and Scala 2.13.17
Build properties: ignoreFailures=false, maxParallelForks=8, maxScalacThreads=8, maxTestRetries=0
MessageGenerator: processed 5 Kafka message JSON file(s).
MessageGenerator: processed 1 Kafka message JSON file(s).
MessageGenerator: processed 2 Kafka message JSON file(s).
MessageGenerator: processed 26 Kafka message JSON file(s).
MessageGenerator: processed 4 Kafka message JSON file(s).
MessageGenerator: processed 44 Kafka message JSON file(s).
MessageGenerator: processed 197 Kafka message JSON file(s).
MessageGenerator: processed 1 Kafka message JSON file(s).
MessageGenerator: processed 4 Kafka message JSON file(s).
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by net.openhft.hashing.UnsafeAccess (file:/home/dejan/.gradle/caches/modules-2/files-2.1/net.openhft/zero-allocation-hashing/0.16/ca252f328160ed5d027f100a4fe525d6d21daaf/zero-allocation-hashing-0.16.jar)
WARNING: Please consider reporting this to the maintainers of class net.openhft.hashing.UnsafeAccess
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/dejan/kafka/metadata/src/test/java/org/apache/kafka/controller/metrics/QuorumControllerMetricsTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
The following classes needed for analysis were missing:
  org.apache.maven.artifact.versioning.InvalidVersionSpecificationException
  org.apache.maven.artifact.versioning.VersionRange
Note: /home/dejan/kafka/server/src/test/java/org/apache/kafka/server/AssignmentsManagerTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by net.openhft.hashing.UnsafeAccess (file:/home/dejan/.gradle/caches/modules-2/files-2.1/net.openhft/zero-allocation-hashing/0.16/ca252f328160ed5d027f100a4fe525d6d21daaf/zero-allocation-hashing-0.16.jar)
WARNING: Please consider reporting this to the maintainers of class net.openhft.hashing.UnsafeAccess
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
Note: /home/dejan/kafka/transaction-coordinator/src/test/java/org/apache/kafka/coordinator/transaction/TransactionLogTest.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/dejan/kafka/connect/runtime/src/test/java/org/apache/kafka/connect/runtime/WorkerSinkTaskTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: /home/dejan/kafka/streams/src/test/java/org/apache/kafka/streams/processor/internals/TaskManagerTest.java uses unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by net.openhft.hashing.UnsafeAccess (file:/home/dejan/.gradle/caches/modules-2/files-2.1/net.openhft/zero-allocation-hashing/0.16/ca252f328160ed5d027f100a4fe525d6d21daaf/zero-allocation-hashing-0.16.jar)
WARNING: Please consider reporting this to the maintainers of class net.openhft.hashing.UnsafeAccess
WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
The following classes needed for analysis were missing:
  com.typesafe.scalalogging.Logger
  org.apache.kafka.server.log.remote.storage.RetriableRemoteStorageException
  com.typesafe.scalalogging.Logger$
dejan@dejan-HP-ProBook-450-G7:~/kafka$ date
Fri 17 Oct 10:33:16 CEST 2025
dejan@dejan-HP-ProBook-450-G7:~/kafka$

@dejan2609 dejan2609 changed the title KAFKA-19771 SpotBugs version update (Java 25 compatible version) KAFKA-19771 Update SpotBugs version and enable Spotbugs Gradle tasks on Java 25 Oct 19, 2025
@dejan2609
Copy link
Contributor Author

Spotbugs (and gradle plugin) version is bumped (some minor issues are solved) so I'll rebase/force-push:

…on Java 25

details:
 - spotbugs: 4.9.4 -->> 4.9.8
 - spotbugs gradle plugin: 6.2.5 -->> 6.4.4
 - spotbugs tasks are enabled for Java 25

related links:
 - https://github.com/spotbugs/spotbugs/blob/4.9.8/CHANGELOG.md#498---2025-10-18
 - https://github.com/spotbugs/spotbugs-gradle-plugin/releases/tag/6.4.4
Copy link
Member

@chia7712 chia7712 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@chia7712
Copy link
Member

the unexpected CI failure is traced by KAFKA-15333

@chia7712 chia7712 merged commit e00be57 into apache:trunk Oct 19, 2025
24 of 26 checks passed
@dejan2609 dejan2609 deleted the KAFKA-19771 branch October 19, 2025 12:01
@github-actions github-actions bot removed the triage PRs from the community label Oct 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build Gradle build or GitHub Actions ci-approved small Small PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants